Forms
Consider a form from a practice site like Demo QA. The form has multiple fields like
- Text field
- Radio Buttons
- Check Box
- Date Picker
- File Upload
- Text Area
- Pickers
- Buttons
DevAssure provides the capability to automate all the fields in a form.
Test Data Management
Additionally, you can also use the same test automation script to validate for multiple data inputs by using the Test Data manager available in-built within DevAssure. The tests will be executed in parallel for different test data set. This greatly reduces the need to add multiple tests for different types of data for similar use cases.
Accessing the test data within the automation
Creating dynamic locators
DevAssure also provides the ability to create dynamic locators. This is specifically useful when selecting values in dropdowns, pickers, checkbox and radio buttons.
Creating a dynamic locator
Accessing a dynamic locator
Creating re-usable functions to select values in pickers or checkbox in a dynamic way
When there are mutliple values to be selected in pickers and checkboxes, these values should be passed from the test data set. Its not scalable to add a column or a separate field for each data. Using DevAssure's Advanced Code Block capabilities this can be easily solved.
Consider the following component that includes searching for a subject and adding multiple subjects.
Advanced Code Block
The input data in the above code is a comma separated list.
The advanced code block can also be used to transform a date string like "18 July, 2022" into values that can be provided to the date picker.